From 7a5272c5d51111d1775f3648cfb26a358416f087 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 3 Feb 2008 08:43:58 +0000 Subject: [PATCH] History should still look right when focusing on an old revision --- includes/ImagePage.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 84beb565e0..e73730bb1e 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -24,6 +24,9 @@ class ImagePage extends Article { $this->img = wfFindFile( $this->mTitle, $time ); if ( !$this->img ) { $this->img = wfLocalFile( $this->mTitle ); + $this->current = $this->img; + } else { + $this->current = $time ? wfLocalFile( $this->mTitle ) : $this->img; } $this->repo = $this->img->repo; } @@ -412,8 +415,8 @@ EOT $sk = $wgUser->getSkin(); if ( $this->img->exists() ) { - $list = new ImageHistoryList( $sk, $this->img ); - $file = $this->img; + $list = new ImageHistoryList( $sk, $this->current ); + $file = $this->current; $dims = $file->getDimensionsString(); $s = $list->beginImageHistoryList() . $list->imageHistoryLine( true, wfTimestamp(TS_MW, $file->getTimestamp()), -- 2.20.1